﻿<%@ Page Title="进阶" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Contact.aspx.cs" Inherits="WebApplication1.Contact" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <style>
        #title{
            width:100%;
            height: calc(10vh);
        }
        #content2{
            width:100%;
            height: calc(70vh);
        }
        #footer{
            width:100%;
            margin-top:10px;
        }
        button{
            float:right;
            background:linear-gradient(to right,#005c97,#363795 77%);
            color:white;
            border-radius:25px;
            line-height:30px;
            width:60px;
        }
    </style>
    <script src="./Scripts/WebForms/jquery-3.3.1.js"></script>
    <script src="./static/js/echarts.min.js"></script>
    <script src="./static/js/dark.js"></script>
    <h2 id="tittle"><%: Title %>.</h2>
    <div id="content2">Your application description page.</div>
    <p id="footer">可以在此查看定制图形等<button type="button" onclick="refresh()">刷新</button></p>
    <script src="./static/js/control2.js"></script>
    <script>
        var visw = '<%=visw%>';
        var count = '<%=count%>';
        var visw1 = visw.split(",");

        function refresh() {
            option.series.data = 
            [
                                                    {
                                                        name: "太阳能",
                                                        itemStyle: {
                                                            color: '#FFD700'//glod ok
                                                        }
                                                    },
                                                    {
                                                        name: "光伏发电",
                                                        itemStyle: {
                                                            color: '#FFFF00'//yellow ok
                                                        }
                                                    },
                                                    {
                                                        name: "电能",
                                                        itemStyle: {
                                                            color: '#008000'//green ok
                                                        }
                                                    },
                                                    {
                                                        name: "居民用电",
                                                        itemStyle: {
                                                            color: '#ADFF2F'
                                                        }
                                                    },
                                                    {
                                                        name: "空气源热泵",
                                                        itemStyle: {
                                                            color: '#ee6666'//ok
                                                        }
                                                    },
                                                    {
                                                        name: "居民用热",
                                                        itemStyle: {
                                                            color: '#FFA500'//orange ok
                                                        }
                                                    },
                                                    {
                                                        name: "储热",
                                                        itemStyle: {
                                                            color: '#FF0000'//red ok
                                                        }
                                                    },
                                                    {
                                                        name: "燃料电池",
                                                        itemStyle: {
                                                            color: '#ea7ccc'// ok
                                                        }
                                                    },
                                                    {
                                                        name: "外部氢能",
                                                        itemStyle: {
                                                            color: '#91cc75'//ok
                                                        }
                                                    },
                                                    {
                                                        name: "外部电能",
                                                        itemStyle: {
                                                            color: '#00FF00'
                                                        }
                                                    },
                ];
            console.log(option.series.data);
            option.series.links = [{
                        source: '太阳能',
                        target: '光伏发电',
                        value: visw1[1]
                    }, {
                        source: '光伏发电',
                        target: '电能',
                        value: visw1[0]
                    }, {
                        source: '太阳能',
                        target: '储热',
                        value: visw1[2]
                    }, {
                        source: '外部电能',
                        target: '电能',
                        value: visw1[3]
                    }, {
                        source: '外部氢能',
                        target: '燃料电池',
                        value: visw1[8]
                    }, {
                        source: '电能',
                        target: '居民用电',
                        value: visw1[5]
                    },{
                        source: '电能',
                        target: '空气源热泵',
                        value: visw1[4]
                    }, {
                        source: '空气源热泵',
                        target: '居民用热',
                        value: visw1[6]
                    },{
                        source: '储热',
                        target: '居民用热',
                        value: visw1[7]
                    }, {
                        source: '燃料电池',
                        target: '储热',
                        value: visw1[2]
                    },{
                        source: '燃料电池',
                        target: '电能',
                        value: visw1[9]
                    }];
            myChart.setOption(option)
        }
    </script>
</asp:Content>
